We are migrating the bug tracker to github Issues. This is now the preferred way to report NASM bugs.

Self-registration is disabled due to spam issue (mail gorcunov@gmail.com or hpa@zytor.com to create an account)

Bug 3392732 - git nasm: %strcat rejects comma-separated string inputs
Summary: git nasm: %strcat rejects comma-separated string inputs
Status: CLOSED FIXED
Alias: None
Product: NASM
Classification: Unclassified
Component: Assembler (show other bugs)
Version: 2.16.xx
Hardware: All All
: Medium blocker
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2020-12-27 16:27 PST by E. C. Masloch
Modified: 2022-11-07 12:37 PST (History)
5 users (show)

Obtained from: Built from git using configure
Generated by: ---
Bug category:
Observed for: ---
Regression: ---
Regression since:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description E. C. Masloch 2020-12-27 16:27:58 PST
The nasm binary is as just built on a Debian 9 server from nasm-2.15.05-113-gdc4a6194. This bug breaks my sources severely.

$ nasm -v
NASM version 2.16rc0 compiled on Dec 28 2020
$ cat test1.asm
%strcat foo "bar","baz"
%warning foo
$ nasm test1.asm
test1.asm:1: error: non-string passed to `%strcat': ,
$ cat test2.asm
%strcat foo "bar" "baz"
%warning foo
$ nasm test2.asm
test2.asm:2: warning: barbaz [-w+user]
$ oldnasm -v
NASM version 2.14.03rc2 compiled on Aug 31 2019
$ oldnasm test1.asm
test1.asm:2: warning: barbaz [-w+user]
$ oldnasm test2.asm
test2.asm:2: warning: barbaz [-w+user]
$
Comment 1 E. C. Masloch 2020-12-27 16:50:09 PST
There is a relatively simple workaround possible, by separating the strings with blanks instead of commas. I succeeded in automating that with the following scriptlet:

ldebug/source$ perl -pe 's/(%strcat)(.*),(.*)/$1$2 $3/g' -i *.mac *.asm
Comment 2 E. C. Masloch 2022-08-06 05:57:28 PDT
This bug is fixed by the patch submitted in https://github.com/netwide-assembler/nasm/pull/25

Please merge it!
Comment 3 H. Peter Anvin 2022-11-07 12:37:10 PST
Merged.